using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Company: BusinessObjectBase
	{

		#region InnerClass
		public enum CompanyFields
		{
			BranchID,
			BranchName,
			Address,
			CompanyName,
			CompanyAddress,
			Phone,
			Fax,
			Email
		}
		#endregion

		#region Data Members

			int _branchID;
			string _branchName;
			string _address;
			string _companyName;
			string _companyAddress;
			string _phone;
			string _fax;
			string _email;

		#endregion

		#region Properties

		public int  BranchID
		{
			 get { return _branchID; }
			 set
			 {
				 if (_branchID != value)
				 {
					_branchID = value;
					 PropertyHasChanged("BranchID");
				 }
			 }
		}

		public string  BranchName
		{
			 get { return _branchName; }
			 set
			 {
				 if (_branchName != value)
				 {
					_branchName = value;
					 PropertyHasChanged("BranchName");
				 }
			 }
		}

		public string  Address
		{
			 get { return _address; }
			 set
			 {
				 if (_address != value)
				 {
					_address = value;
					 PropertyHasChanged("Address");
				 }
			 }
		}

		public string  CompanyName
		{
			 get { return _companyName; }
			 set
			 {
				 if (_companyName != value)
				 {
					_companyName = value;
					 PropertyHasChanged("CompanyName");
				 }
			 }
		}

		public string  CompanyAddress
		{
			 get { return _companyAddress; }
			 set
			 {
				 if (_companyAddress != value)
				 {
					_companyAddress = value;
					 PropertyHasChanged("CompanyAddress");
				 }
			 }
		}

		public string  Phone
		{
			 get { return _phone; }
			 set
			 {
				 if (_phone != value)
				 {
					_phone = value;
					 PropertyHasChanged("Phone");
				 }
			 }
		}

		public string  Fax
		{
			 get { return _fax; }
			 set
			 {
				 if (_fax != value)
				 {
					_fax = value;
					 PropertyHasChanged("Fax");
				 }
			 }
		}

		public string  Email
		{
			 get { return _email; }
			 set
			 {
				 if (_email != value)
				 {
					_email = value;
					 PropertyHasChanged("Email");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("BranchID", "BranchID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("BranchName", "BranchName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Address", "Address",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("CompanyName", "CompanyName",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("CompanyAddress", "CompanyAddress",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Phone", "Phone",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Fax", "Fax",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Email", "Email",100));
		}

		#endregion

	}
}
